setGlobalDuration(-1)

oscReceive(bus='pit', address='/pit', port=9000)
sine(pitch=100, pitchVar='pit')

startCsound()

def spinner(evt):
    print sp.GetValue()
    sendOscControl(sp.GetValue(), address='/pit', port=9000)

frame = beginGUI(size=(150,150))
sp = makeSpin(frame, init=1, mini=1, maxi=10, pos=(20,20), function=spinner)
endGUI(frame)